import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as adminActions from '../redux/actions/admin';
import AdminView from '../views/AdminView';

function mapStateToProps(state) {
    const { adminData } = state;
    return {
        adminData
    }
}

function mapDispatchToProps(dispatch) {
    const actions = { ...adminActions };
    return {
        actions: bindActionCreators(actions, dispatch)
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(AdminView);